package com.ve.clexer.tree;

public class Variable extends Node{
	public VariableType type;//类型
	public boolean isConst,isStatic;
	
	public Variable() {
	}
	public Variable(String name) {
		this.name = name;
	}

	


	@Override
	public String toString() {
		return type+" "+name;
	}
	public static class VariableType {
		public int pointLevel;
		public Type type;

		public VariableType(Type type) {
			this.type = type;
			pointLevel=0;
		}

		public VariableType(Type type,int pointLevel) {
			this.pointLevel = pointLevel;
			this.type = type;
		}

		@Override
		public String toString() {
			StringBuilder sb=new StringBuilder(type.getName());
			for (int i=0;i<pointLevel;i++){
				sb.append("*");
			}
			return sb.toString();
		}
		
	}
}
